﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DIS.Infrastructure.Entities.Repository;
using DIS.Infrastructure.Entities.Enum;
using DIS.Infrastructure.Entities.Cache;

namespace DIS.Infrastructure.Entities.Entity
{
    public class Project : IAccessible<T_Project, Project>, ILogicEntity<T_Project, Project>
    { 
        public int Id { get; set; }
        
        public string ProjectCode { get; set; }
         
        public string ProjectName { get; set; }
         
        public int IsDeleted { get; set; }

        protected override void Covariant(T_Project model)
        {
            this.Id = model.Id;
            this.ProjectCode = model.ProjectCode;
            this.ProjectName = model.ProjectName;
            this.IsDeleted = model.IsDeleted;

        }
        protected override T_Project Inverter(Project model)
        {
            return new T_Project()
            {
                Id = model.Id,
                ProjectCode = model.ProjectCode,
                ProjectName = model.ProjectName,
                IsDeleted = model.IsDeleted
            };
        }
        public Project Set(T_Project dbModel)
        {
            Covariant(dbModel);
            return this;
        }
    }
}
